package com.engine4cloud.tdf.supervision.dto.update;

import com.engine4cloud.tdf.supervision.dto.JzdxFileDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 经常性跨市县活动
 *
 * @author wenjie
 * @date 2024-04-11 10:22:38
 */
@Data
@Schema(description = "经常性跨市县活动")
public class SpUsualOutUpdateDTO implements Serializable {

    /**
     * 主键
     */
    @Schema(description = "主键")
    @NotNull(message = "主键不能为空")
    private Long id;

    /**
     * 申请时间
     */
    @Schema(description = "申请时间", example = "2024-01-01 00:00:00")
    @NotNull(message = "申请时间不能为空")
    private LocalDateTime sqsj;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间", example = "2024-01-01")
    @NotNull(message = "开始时间不能为空")
    private LocalDate kssj;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间", example = "2024-01-01")
    @NotNull(message = "结束时间不能为空")
    private LocalDate jssj;

    /**
     * 去往市县详细地址
     */
    @Schema(description = "去往市县详细地址")
    @NotBlank(message = "去往市县详细地址不能为空")
    private String qwsxdzmx;

    /**
     * 理由
     */
    @Schema(description = "理由")
    @NotBlank(message = "理由不能为空")
    private String ly;

    /**
     * 去往所在地
     */
    @Schema(description = "去往所在地", example = "[\"460000\",\"46000A\",\"469006\",\"36327\"]")
    @NotEmpty(message = "去往所在地不能为空")
    @Size(min = 3, message = "去往所在地必须至少选三级")
    private List<String> destinationList;

    /**
     * 文书材料
     */
    @Schema(description = "法律文书", example = """
            [{"name": "张三.png",
            "url": "/supervision/oss-file/oss/file?fileName=09468fc20f2544e28891a058858fdf58.jpeg"}
            ]""")
    @NotEmpty(message = "相关法律文书材料不能为空")
    private List<JzdxFileDTO> instrumentList;
}